package com.qianfeng.day1029.job;

import com.dangdang.ddframe.job.api.ElasticJob;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.springframework.stereotype.Component;

/**
 * author: 田晋宇
 * datetime:2021/10/29 11:13
 * email:853796359@qq.com
 */
@Component
public class MyEsJob  implements SimpleJob {


    @Override
    public void execute(ShardingContext shardingContext) {

        switch (shardingContext.getShardingItem()){

            case 1:
                System.out.println("任务1.......");
                break;
            case 2:
                System.out.println("任务2.....");
                break;
            case 3:
                System.out.println("任务3......");
                break;
        }


    }
}
